package com.example.demo.bean;

/**
 * @desc: <br/>
 * @author: Jingbo Hu<br/>
 * @time：2021年01⽉22⽇<br/>
 * @version：v1.0.0<br>
 */
public class CodeBlockDemo {
    static {
        System.out.println("静态代码块");
    }
    {
        System.out.println("构造代码块");
    }
    public CodeBlockDemo() {
        System.out.println("无参构造函数");
    }
    public void sayHello() {
        {
            System.out.println("普通代码块");
        }
    }
    public static void main(String[] args) {
        System.out.println("执行了main方法");
        new CodeBlockDemo().sayHello();
        System.out.println("---------------");
        new CodeBlockDemo().sayHello();
    }
}
